package com.swgk.core.recyclerview.adapter;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.swgk.core.BR;
import com.swgk.core.R;
import com.swgk.core.recyclerview.entity.BaseAreaEntity;

import java.util.List;

public class MultiParentAdapter extends BaseRecycleAdapter<BaseAreaEntity<List<BaseAreaEntity>>> {

    public MultiParentAdapter(Context context, List<BaseAreaEntity<List<BaseAreaEntity>>> datas, int tag) {
        super(context, tag, datas);

    }

    @Override
    public void convert(ItemViewHolder holder, final BaseAreaEntity<List<BaseAreaEntity>> entity) {
        holder.setBinding(BR.viewModel, entity);
        TextView tvName = holder.getItem().findViewById(R.id.tv_name);
        tvName.setText(entity.getName());
        holder.itemView.findViewById(R.id.select_img).setVisibility(View.GONE);
        holder.itemView.findViewById(R.id.tv_name).setBackgroundResource(R.drawable.select_province_item_bg);
    }

}
